package sany.iec.service;

import com.serotonin.modbus4j.ModbusSlaveSet;
import org.openmuc.j60870.Server;
import sany.iec.entity.DataEntity;
import sany.iec.entity.ServerEntity;

/**
 * @Author 托马斯
 * @Date 2025/7/6 18:26
 * @Description ModbusService
 */
public interface ModbusServerService {

    void startServer(ServerEntity data, ModbusSlaveSet server);

    Float readCoil(ServerEntity server, DataEntity data);

    Float readInput(ServerEntity server, DataEntity data);

    Float readHoldRegister(ServerEntity server, DataEntity data);

    Float readInputRegister(ServerEntity server, DataEntity data);

    void writeCoil(ServerEntity server, DataEntity data, boolean value);

    void writeInput(ServerEntity server, DataEntity data, boolean value);

    void writeHoldRegister(ServerEntity server, DataEntity data, float value);

    void writeInputRegister(ServerEntity server, DataEntity data, float value);

}
